package cn.ycc1.bean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * 对一批对象编程增强
 * @author ycc
 * @date 2024/7/9
 */
public class MyBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object obj, String s) throws BeansException {
        System.out.println("postProcessBeforeInitialization方法被调用");
        return obj;
    }

    @Override
    public Object postProcessAfterInitialization(Object obj, String s) throws BeansException {
        System.out.println("postProcessAfterInitialization方法被调用");
        return obj;
    }
}
